//: Playground - noun: a place where people can play

import UIKit

struct Person {
    var name: String
    var age: Int
    var weight:Double
}
let person:Any = Person(name: "13", age: 12,weight:99)
dump(person)

func anyobjectConvertDic(any:Any)->[String:Any]?{
    var dic:[String:Any] = [:]
    for childer in Mirror(reflecting: any).children {
        dic[childer.label!] = childer.value
    }
    return dic
}

print(anyobjectConvertDic(any: person) ?? 00)
